package VN.EDU.IMIC.DEVELOPER.TRANTHITHANHNGA.ARRAY.EX2;

public class Models {

	/**
	 * Tính điểm trung bình
	 * 
	 * @param int[]array
	 */
	public static int average(int[] array) {
		int sum = 0;
		for (int i = 0; i < array.length; i++) {
			sum += array[i];
		}
		return (int) (sum / (array.length));
	}

	public static double average(double[] array) {
		double sum = 0;
		for (int i = 0; i < array.length; i++) {
			sum += array[i];
		}
		return (sum / (array.length));
	}
}
